\documentclass[a4paper]{book}
\usepackage{a4wide}
\usepackage{makeidx}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{float}
\usepackage{textcomp}
\usepackage{alltt}
\usepackage{times}
\usepackage{ifpdf}
\usepackage{listings}
\ifpdf
\usepackage[pdftex,
            pagebackref=true,
            colorlinks=true,
            linkcolor=blue,
            unicode
           ]{hyperref}
\else
\usepackage[ps2pdf,
            pagebackref=true,
            colorlinks=true,
            linkcolor=blue,
            unicode
           ]{hyperref}
\usepackage{pspicture}
\fi
\usepackage[utf8]{inputenc}

\lstdefinelanguage{vorpal} 
{morekeywords={for,while,break,self,return,true,false, 
none,new,sys,method,code}, 
sensitive=false, 
morecomment=[l]{\#}, 
morecomment=[s]{/*}{*/}, 
morestring=[d]' 
}

\newcommand{\vorpal}{\lstset{numbers=left, numberstyle=\tiny, stepnumber=2, numbersep=5pt, language=vorpal, keywordstyle=\color{blue}, stringstyle={\color{red} \ttfamily}, showstringspaces=false} 
\begin{lstlisting}}

\newcommand{\vorpalshort}{\lstset{numbers=left, numberstyle=\tiny, stepnumber=0, numbersep=5pt, language=vorpal, keywordstyle=\color{blue}, stringstyle={\color{red} \ttfamily}, showstringspaces=false} 
\begin{lstlisting}}

\makeindex
\setcounter{tocdepth}{3}
\renewcommand{\footrulewidth}{0.4pt}
\begin{document}
\begin{titlepage}
\vspace*{7cm}
\begin{center}
{\Large Vorpal v.0.20}\\
\vspace*{1cm}
{\large University of Canterbury}\\
\vspace*{0.5cm}
{\small copyright 2007 - 2009}\\
\end{center}
\end{titlepage}
\pagenumbering{roman}
\tableofcontents
\pagenumbering{arabic}


\include{overview}
\include{starting}
\include{programming}
\include{concurrency}
\include{embedding}
\include{develop}
\include{faq}


\printindex
\end{document}
